package com.dianqiu.common.bean;

import java.sql.Timestamp;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.dianqiu.base.bean.BaseTO;

/**
 * DqBetUserMatchHist entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "dq_bet_user_match_hist", catalog = "dq_dev")
public class DqBetUserMatchHistTO  extends BaseTO  implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private DqBetUserMatchHistIdTO id;
	private DqMatchHistTO dqMatchHist;
	private DqHandicapHistTO dqHandicapHist;
	private Integer clbBetted;
	private Long stake;
	private Long result;
	private Timestamp betDate;

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "userId", column = @Column(name = "USER_ID", nullable = false, length = 13)),
			@AttributeOverride(name = "mthId", column = @Column(name = "MTH_ID", nullable = false)),
			@AttributeOverride(name = "hndpId", column = @Column(name = "HNDP_ID", nullable = false)),
			@AttributeOverride(name = "seq", column = @Column(name = "SEQ", nullable = false)) })
	public DqBetUserMatchHistIdTO getId() {
		return id;
	}

	public void setId(DqBetUserMatchHistIdTO id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MTH_ID", nullable = false, insertable = false, updatable = false)
	public DqMatchHistTO getDqMatchHist() {
		return this.dqMatchHist;
	}

	

	public void setDqMatchHist(DqMatchHistTO dqMatchHist) {
		this.dqMatchHist = dqMatchHist;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "HNDP_ID", nullable = false, insertable = false, updatable = false)
	public DqHandicapHistTO getDqHandicapHist() {
		return this.dqHandicapHist;
	}

	public void setDqHandicapHist(DqHandicapHistTO dqHandicapHist) {
		this.dqHandicapHist = dqHandicapHist;
	}

	@Column(name = "STAKE", nullable = false, precision = 10, scale = 0)
	public Long getStake() {
		return this.stake;
	}

	@Column(name = "CLB_BETTED", nullable = false, length = 8)
	public Integer getClbBetted() {
		return clbBetted;
	}

	public void setClbBetted(Integer clbBetted) {
		this.clbBetted = clbBetted;
	}
	
	public void setStake(Long stake) {
		this.stake = stake;
	}

	@Column(name = "RESULT", precision = 10, scale = 0)
	public Long getResult() {
		return this.result;
	}

	public void setResult(Long result) {
		this.result = result;
	}

	@Column(name = "BET_DATE", length = 19)
	public Timestamp getBetDate() {
		return this.betDate;
	}

	public void setBetDate(Timestamp betDate) {
		this.betDate = betDate;
	}

	
}